package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.CommentManagement;
import com.ruoyi.recycle.mapper.CommentManagementMapper;
import com.ruoyi.recycle.service.ICommentManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评论管理Service业务层处理
 *
 * @author Wubk
 * @date 2022-05-22
 */
@Service
public class CommentManagementServiceImpl extends ServiceImpl<CommentManagementMapper, CommentManagement> implements ICommentManagementService {
    @Autowired
    private CommentManagementMapper commentManagementMapper;

    /**
     * 查询评论管理
     *
     * @param id 评论管理主键
     * @return 评论管理
     */
    @Override
    public CommentManagement selectCommentManagementById(Long id) {
        return commentManagementMapper.selectCommentManagementById(id);
    }

    /**
     * 查询评论管理列表
     *
     * @param commentManagement 评论管理
     * @return 评论管理
     */
    @Override
    public List<CommentManagement> selectCommentManagementList(CommentManagement commentManagement) {
        return commentManagementMapper.selectCommentManagementList(commentManagement);
    }

    /**
     * 新增评论管理
     *
     * @param commentManagement 评论管理
     * @return 结果
     */
    @Override
    public int insertCommentManagement(CommentManagement commentManagement) {
        return commentManagementMapper.insertCommentManagement(commentManagement);
    }

    /**
     * 修改评论管理
     *
     * @param commentManagement 评论管理
     * @return 结果
     */
    @Override
    public int updateCommentManagement(CommentManagement commentManagement) {
        return commentManagementMapper.updateCommentManagement(commentManagement);
    }

    /**
     * 批量删除评论管理
     *
     * @param ids 需要删除的评论管理主键
     * @return 结果
     */
    @Override
    public int deleteCommentManagementByIds(Long[] ids) {
        return commentManagementMapper.deleteCommentManagementByIds(ids);
    }

    /**
     * 删除评论管理信息
     *
     * @param id 评论管理主键
     * @return 结果
     */
    @Override
    public int deleteCommentManagementById(Long id) {
        return commentManagementMapper.deleteCommentManagementById(id);
    }
}
